#ifndef SOCKET_H
#define SOCKET_H
#include <SDL_net.h>

#include "SockMessage.h"

class Socket
{
public:
	Socket();
	Socket(TCPsocket tcp);
	~Socket();

	void Close();
	bool HasData();
	bool IsOpen();
	bool Recv(SockMessage* sm);
	bool Send(SockMessage& sm);

	std::string GetIp();
	int GetPort();
protected:
	int m_Port;
	IPaddress m_Ip;
	TCPsocket m_TcpSock;
	bool m_Open;
	SDLNet_SocketSet m_SockSet;
	bool m_hasData;
private:

};
#endif